package c.a.md.androidvideo.gles;

import android.opengl.GLSurfaceView;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class TriangleActivity extends AppCompatActivity
{

    private GLSurfaceView mGlSurfaceView;
    private TriangleRender glRender;

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);

        mGlSurfaceView = new GLSurfaceView(this);
        setContentView(mGlSurfaceView);

        mGlSurfaceView.setEGLContextClientVersion(2);
        mGlSurfaceView.setRenderer(new TriangleRender());
        mGlSurfaceView.setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY);
    }

    @Override
    protected void onResume()
    {
        super.onResume();
        mGlSurfaceView.onResume();
    }

    @Override
    protected void onPause()
    {
        super.onPause();
        mGlSurfaceView.onPause();
    }
}
